package com.kang.feign;

import com.kang.entity.Essay;
import com.kang.entity.Park;
import com.kang.util.WebResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author: 康康
 * @Date: 2023/03/12/11:12
 */
@FeignClient(value = "base-user")
public interface UserFeignClient {

    @GetMapping("/user/park/getParkPage")
    public WebResponse getParkPage(@RequestParam("pageNum") Integer pageNum,
                                   @RequestParam("pageSize") Integer pageSize,
                                   @RequestParam("parkName") String parkName,
                                   @RequestParam("startTime") String startTime,
                                   @RequestParam("endTime") String endTime,
                                   @RequestParam("status") Integer status
                                    );


    @GetMapping("/user/park/getParkById")
    public WebResponse getParkById(@RequestParam("id") Integer id);

    @PostMapping("/user/park/deletePark")
    public WebResponse deletePark(@RequestBody Park park);

    @PostMapping("/user/essay/deleteEssay")
    public WebResponse deleteEssay(@RequestBody Essay essay);

    @GetMapping("/user/essay/getHotEssay")
    public WebResponse getHotEssay();

}
